package cn.liit.weixin.custommsg.support;

import cn.liit.weixin.custommsg.model.BaseMsg;
import cn.liit.weixin.custommsg.util.MsgUtils;

/**
 * @author zhangboqi
 * 描述：消息发送线程
 */
public class CustomMsgThread extends Thread{
	
	private BaseMsg baseMsg;//发送的消息对象
	private long millis;//线程停止时间
	
	public CustomMsgThread(BaseMsg baseMsg,long millis) {
		this.baseMsg = baseMsg;
		this.millis = millis;
	}
	@Override
	public void run() {
		try {
			Thread.currentThread().sleep(millis);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		MsgUtils.sendCustomMsg(baseMsg);
	}
}
